package mapred.util;

public class Utils {

    public static String getHost(String url) {
        try {
            url = url + "/";
            url = url.replaceAll("\\?", "/\\?");
            url = url.replaceAll("=", "/=");
            return url.substring(0, url.indexOf("/", url.indexOf("://") + 3));
        } catch (Exception e) {
            return "";
        }
    }

}
